package com.buddha.api.mapper;

import com.buddha.api.entity.Article;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author mybatis-plus
 * @since 2023-07-06
 */
@Mapper
public interface ArticleMapper extends BaseMapper<Article> {
    @Select("select  * from article where state !=1 order by commit_time desc")
    List<Article> findAll();

    @Select("select * from article limit 6")
    List<Article> getHot();
}
